### --- Test setup ---
if(FALSE) {
	## Not really needed, but can be handy when writing tests
	library("RUnit")
	library("unsupervisedMicroarray")
	
}

#data for tests
library(rda)
data(brain)
data(iris)
irDat <- as.matrix(iris[,-5])
irC <- as.numeric(iris[,5])

bx <- brain.x[,70:100]
by <- brain.y
mm<-(matrix(runif(100),ncol=5))
mmC <- c(rep(1,10),rep(2,10)) 

test.framework <-function(){
	
	kgdc <- new("KGDimChooser",1,1)
	bsdc <- new("BStickDimChooser",1,1)
	
	pcar <-new("PCAReducer",kgdc,TRUE,FALSE)
	phcl <- new("HierParamClusterAlg",3)
	phcl2 <- new("HierParamClusterAlg",4)
	#list computers
	rlC <- new("ReduceClustListComputer",pcar,phcl)
	rlC2 <- new("ReduceClustListComputer",pcar,phcl2)
	comps <-list()
	comps[[1]] <-rlC
	comps[[2]] <-rlC2
	#bootstrap
	
	#score
	indO <- new("SilhIClusterScore")
	#final result
	
	wt <- new("WilcoxonHtester")
	pTester <- new("PHTestBFrameworkFinalResult",hTester=wt)
	#bootstraped set
	nboots <-3
	rboots <- new("RowBootstrapedSet",list(X=irDat,Y=irC),nboots)
	
	BF <- new("BootstrapFramework", bootstraper=rboots, scoreObj=indO, listComp = comps, 
			finalResultProducer = pTester)
	result <-runFramework(BF)
	
	#print(result)
	#try with external score
	indO <- new("HARandEClusterScore")
	
	BF <- new("BootstrapFramework", bootstraper=rboots, scoreObj=indO, listComp = comps, 
			finalResultProducer = pTester)
	result <-runFramework(BF)
	
	
}